<template>
  <a-card>
    <template #title>
      <span class="icon"></span>
      <span class="text">我的消息</span>
    </template>
    <template #extra>更多></template>
    <a-list :bordered="false">
      <a-list-item v-for="(item, idx) in taskInfo" :key="idx">
        <a-list-item-meta>
          <template #description>
            <div class="icon"></div>
            <div class="content">{{ item.content }}</div>
            <div class="date">{{ item.date }}</div>
          </template>
        </a-list-item-meta>
      </a-list-item>
    </a-list>
  </a-card>
</template>

<script lang="ts" setup>
import { ref, onMounted } from "vue";

const taskInfo = ref([]);
const fetchData = () => {
  taskInfo.value = [
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
    {
      content: "阿勒泰地区第一高级中学召开2022年干部职工作会",
      date: "2022-07-04",
    },
  ];
};
onMounted(() => {
  fetchData();
});
</script>

<style lang="less" scoped>
.arco-card {
  width: 100%;
  height: 350px;
  margin-bottom: 30px;
  background: #fff;
  border-radius: 10px;

  .arco-card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
  }

  .arco-card-header-title {
    display: flex;
    align-items: center;

    .icon {
      display: inline-block;
      width: 18px;
      height: 18px;
      margin-right: 8px;
      background: url("@/assets/images/计划.png") center center no-repeat;
      background-size: contain;
    }

    .text {
      font-family: SourceHanSansSCVF-Medium;
      font-size: 18px;
      font-weight: 500;
      line-height: 20px;
      color: #9caaba;
    }
  }

  /deep/.arco-card-header-extra {
    font-size: 15px;
    color: #999 !important;
  }

  /deep/.arco-list-item {
    padding: 10px !important;

    .arco-list-item-meta-description {
      display: flex;
      align-items: center;

      .icon {
        flex: 1;
        width: 18px;
        height: 18px;
        background: url("@/assets/images/右箭头.png") center center no-repeat;
        background-size: contain;
      }

      .content {
        flex: 8;
        font-size: 14px;
        color: #333;
      }

      .date {
        font-size: 14px;
        color: #999;
      }
    }
  }
}
</style>
